laravel fetch max value

30

Cliente::max('id')
  
  or
  
$maxValue = Cliente::orderBy('id', 'desc')->value('id'); // gets only the id  

Comments

Submit
0 Comments